home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / CLIPSTAC.ARJ / WINDLG.H < prev    next >
C/C++ Source or Header  |  1992-03-27  |  930b  |  43 lines

  1. // windlg.h RHS 1/15/92
  2.  
  3. #if !defined(WINDLG_H)
  4. #define WINDLG_H
  5.  
  6. #include"winapp.h"
  7.  
  8.  
  9. long far pascal WinDlgWndProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam);
  10.  
  11.  
  12. class WinDlg : public Window
  13.     {
  14. public:
  15.     WinDlg(char *name) : Window(name)
  16.         {
  17.         SetClassWinProc(WinDlgWndProc);
  18.         AddClassWinXbytes(DLGWINDOWEXTRA);
  19.         }
  20.     BOOL Create(void)
  21.         {
  22.         Register();
  23.         SetWinInstance(GetInstance());
  24.         SetWinClassName(GetClassName());
  25.         SetWinParams((LPSTR)this);
  26.         extern Window *winDlg;
  27.         winDlg = this;
  28.         if(hWnd = CreateDialog(GetInstance(), GetClassName(), 0, NULL))
  29.             return TRUE;
  30.         return FALSE;
  31.         }
  32.     virtual BOOL UserMessageProcessing(MSG *msg)    
  33.         {
  34.         if(!hWnd || !IsDialogMessage(hWnd,msg))
  35.             return FALSE;
  36.         return TRUE;
  37.         }
  38.     };
  39.   
  40.  
  41. #endif
  42.  
  43.